import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import {getCategoryAPI} from '@/apis/layout'

export const useCategoryStore = defineStore('category', () => {

    let categoryList = ref([]);
    const getCategory = async () => {
        let data = await getCategoryAPI();
        categoryList.value = data.result;
    }

    return {
        categoryList,
        getCategory
    }
})
